package com.study.stream;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class StreamDemo {

    private static List<Author> getAuthors(){
        //数据初始化
        Author author = new Author(1L, "蒙多", 33, "一个从菜刀中明悟哲理的祖安人", null);
        Author author2=new Author(2L, "亚拉索", 15, "狂风也追逐不上他的思考速度", null);
        Author author3=new Author(3L, "易", 14, "是这个世界在限制他的思维", null);
        Author author4=new Author(3L, "易", 14, "是这个世界在限制他的思维", null);
        //书籍列表
        List<Book> books1 = new ArrayList<>();
        List<Book> books2 = new ArrayList<>();
        List<Book> books3 = new ArrayList<>();

        books1.add(new Book(1L, "道道地地","哲学，爱情", 88, "用一把刀划分爱恨"));
        books1.add(new Book(2L, "道道地地1231","个人成长，爱情", 99, "用一sdfa把刀划分爱恨"));

        books2.add(new Book(3L, "道道地g实得分给对方31","哲学", 12, "用哥哥哥哥分划分爱恨"));
        books2.add(new Book(3L, "道道地g实得分给对方31","哲学", 12, "用哥哥哥哥分划分爱恨"));
        books2.add(new Book(4L, "444道道地g实得分给对方31","哲学", 44, "用4444哥哥哥哥分划分爱恨"));

        books2.add(new Book(5L, "55道道地55g实得分给对方31","哲学", 55, "用555哥哥哥哥分划分爱恨"));
        books2.add(new Book(6L, "66道道地55g实得分给对方31","哲学", 66, "用6656哥哥哥哥分划分爱恨"));

        author.setBooks(books1);
        author2.setBooks(books2);
        author3.setBooks(books3);
        author4.setBooks(books3);

        List<Author> authorList = new ArrayList<>(Arrays.asList(author, author2, author3, author4));
        return authorList;
    }


}
